#include <cmath>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void test1()
{
    vector<int> vel = {3, 2, 0, 78, 3, 2, 55, 41, 42};
    vector<string> str = {"hello", " ", "world"};
    string str1 = "hello";
    string str2 = "world";
    int val = 42;
    auto result = find(vel.begin(), vel.end(), val);
    int sum = accumulate(vel.begin(), vel.end(), 0);
    string sum_str = accumulate(str.begin(), str.end(), string(""));
    cout << result - vel.begin() << endl;
    sort(vel.begin(), vel.end());
    for (int i : vel)
    {
        cout << i << " ";
    }
    cout << endl;
    auto end_unique = unique(vel.begin(), vel.end());
    vel.erase(end_unique, vel.end());
    for (int i : vel)
    {
        cout << i << " ";
    }
    cout << "求和为" << sum << endl;
    // cout << str1 + str2 << endl;
    // cout << sum_str << endl;
    // cout << *result << endl
}
void test2()
{
    double a = 1;
    auto f = [a](double x) -> double
    { return exp(-pow(x, 2)) + a; };
    cout << f(12) << endl;
}
int main()
{
    test2();
}